package main

import "sync"

func main() {
	wg := sync.WaitGroup{}
	si := []int{1,2,3,4,5,6,7,8,9,10}
	for i := range si {
		wg.Add(1)
		go func(a int) {
			println(a)
			wg.Done()
		}(i)
	}
	wg.Wait()
}
